﻿using System.Collections.Generic;
using UnityEngine;

public class TempObject
{
    /// <summary>
    /// 资源列表
    /// </summary>
    private List<Object> assetList = null;
    public List<Object> assets { get { return assetList; } }

    public TempObject(params Object[] assets) { 
        assetList=new List<Object>();
        assetList.AddRange(assets);
    }

    public void UnLoadAsset() 
    {
        for (int i = assetList.Count - 1; i >= 0; i--) 
        { 
            Resources.UnloadAsset(assetList[i]);
        }
    }
}
